<template>
	<view>
		<button type="default" @click="click1">总分</button>
		<button type="default" @click="click2">语文</button>
		<button type="default" @click="click3">数学</button>
		<button type="default" @click="click4">英语</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			setSubject(subject) {
				const pages = getCurrentPages();
				const prevPage = pages[pages.length - 2];
				prevPage.setSubject(subject);
				uni.navigateBack();
			},
			click1() {
				this.setSubject('总分') ;
			},
			click2() {
				this.setSubject('语文') ;
			},
			click3() {
				this.setSubject('数学') ;
			},
			click4() {
				this.setSubject('英语') ;
			}
		}
	}
</script>

<style>

</style>
